const express = require('express');
const router = express.Router();
const router_handler = require('../router_handler/register')
const { setupWebSocket } = require('../router_handler/index');

//注册路由
router.post('/register', router_handler.reguser)

router.post('/login', router_handler.login)

router.post('/validCode', router_handler.validCode)

router.get('/ws', (req, res) => {
    setupWebSocket(req.socket.server);
    res.send('WebSocket服务已启动');
});

module.exports = router;